// VS2010CtxMenuFixApp.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "VS2010CtxMenuFixApp.h"

// Global Variables
HINSTANCE g_hInst = NULL;
CAppResources* g_cAppResources;

int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, int)
{
    g_hInst = hInstance;
    g_cAppResources = new CAppResources();

    CApp cApp;
    if (!cApp.Success())
    {
        return FALSE;
    }

    if (!CAppStartup::DoesAppStartsWhenWindowsStarts())
    {
        if (MessageBox(NULL, g_cAppResources->GetStartQuestion(), g_cAppResources->GetAppTitle(), MB_ICONQUESTION | MB_OKCANCEL | MB_DEFBUTTON2))
        {
            CAppStartup::SetAppStartsWhenWindowsStarts();
        }
    }

    MSG msg;
    while (GetMessage(&msg, NULL, 0, 0))
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }

    return (int) msg.wParam;
}
